﻿using Architecture.Api.Application.Commands.CultureCommand;
using Architecture.Domain.Services.Interface;
using Architecture.Domian.DTO;
using MediatR;

namespace Architecture.Api.Application.CommandHandlers.CultureHandler
{
    public class CultrueQueryCulturePicListCommandHandler : IRequestHandler<CultrueQueryCulturePicListCommand, List<PictureDTO>>
    {
        private readonly ICultureService _cultureService;

        public CultrueQueryCulturePicListCommandHandler(ICultureService cultureService)
        {
            _cultureService = cultureService;
        }

        public async Task<List<PictureDTO>> Handle(CultrueQueryCulturePicListCommand request, CancellationToken cancellationToken)
        {
            return await _cultureService.GetCulturePicture(request.productionLot);
        }
    }
}
